1. Technical Field
The present invention relates to a programmable logic controller (PLC) symbol structure of a PLC code for automatically generating an input/output model, and a simulation apparatus and method for testing a PLC code using the PLC symbol structure, and more particularly, to a PLC symbol structure that systematically includes information required to automatically generate an input/output model, and a simulation apparatus and method for testing a PLC code using the PLC symbol structure.
2. Description of the Related Art
As industries have been rapidly developed and highly advanced, an automated manufacturing system has been evolving fast than ever. With the development of industries, a conventional automated manufacturing system needs to be changed into a new automated manufacturing system, and the delay in introducing a new automated system may cause a great loss of profit and credibility.
Various automated facilities which constitute an automated manufacturing system are controlled and operated by a programmable logic controller (PLC). The PLC stores therein ladder diagram information as a control program in the form of Boolean logic.
The automated facilities of the automated manufacturing system are operated in response to PLC output signals output from the PLC. The process state during operation or after operation may be monitored by a sensor and transmitted to the PLC in the form of a PLC input signal. The PLC input signal is a signal containing information on the updated process state.
The PLC re-performs an internal logic operation in response to the PLC input signal to output a PLC output signal. The PLC output signal is a signal that instructs the automated facilities to perform the next process according to the updated process state. The automated equipment performs processes, which accord with the updated process state, in response to the PLC output signal.
To run an automated manufacturing system in practice, a process control operator may write in person a control program for the automated manufacturing process by including PLC code, and make a test run of the control program by applying it to real facilities of the system. However, since the control program is apt to have inherent human error, the manufacturing control operator needs to test the automated manufacturing system prior to the test running with respect to ladder diagram that includes the PLC code.
For immediate introduction of an automated manufacturing system, it becomes general to test the automated manufacturing system, and control engineers thus have paid growing attention to the test of the control program for the automated manufacturing system. In addition, verifying the control program after satisfactory design of PLC is a prerequisite for introducing an automated control system.
In the course of testing a PLC code, a model to virtually execute functions of real automated facilities is required, and is referred to as a plant model. The plant model operates the virtual facilities in response to a received PLC output signal, and transmits, to the PLC, a virtual facility operating state and sensor values in the form of PLC input signals wherein the sensor values are updated according to a process state that is updated based on the result of operating the virtual facility operation.
A typical method of testing a PLC code is to test using the aforementioned virtual plant model. To construct such a plant model, a process control operator needs to thoroughly analyze a PLC code. In some cases, the process control operator may have to gain such a level of knowledge that is required for writing a PLC code.
Such analysis and achievement of the knowledge take a substantial amount of time and effort, and accuracy and integration of a plant model constructed accordingly cannot be completely assured. Thus, when an error is detected in the course of testing a PLC code, it may not be possible to identify whether the detected error is a plant model error or a PLC code error.